/*
 * MIT License
 *
 * Copyright (c) Microsoft Corporation.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 *
 * ------------------------------------------------------------------------------
 * <auto-generated>
 * This code was generated by a tool at:
 * /utils/doclint/generateDotnetApi.js
 *
 * Changes to this file may cause incorrect behavior and will be lost if
 * the code is regenerated.
 * </auto-generated>
 * ------------------------------------------------------------------------------
 */
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Runtime.Serialization;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;

namespace Microsoft.Playwright
{
	/// <summary>
	/// <para>
	/// At every point of time, page exposes its current frame tree via the <see cref="IPage.MainFrame"/>
	/// and <see cref="IFrame.ChildFrames"/> methods.
	/// </para>
	/// <para>
	/// <see cref="IFrame"/> object's lifecycle is controlled by three events, dispatched
	/// on the page object:
	/// </para>
	/// <list type="bullet">
	/// <item><description>
	/// <see cref="IPage.FrameAttached"/> - fired when the frame gets attached to the page.
	/// A Frame can be attached to the page only once.
	/// </description></item>
	/// <item><description>
	/// <see cref="IPage.FrameNavigated"/> - fired when the frame commits navigation to
	/// a different URL.
	/// </description></item>
	/// <item><description>
	/// <see cref="IPage.FrameDetached"/> - fired when the frame gets detached from the
	/// page.  A Frame can be detached from the page only once.
	/// </description></item>
	/// </list>
	/// <para>An example of dumping frame tree:</para>
	/// </summary>
	public partial interface IFrame
	{
		/// <summary>
		/// <para>
		/// Returns the added tag when the script's onload fires or when the script content
		/// was injected into frame.
		/// </para>
		/// <para>Adds a <c>&lt;script&gt;</c> tag into the page with the desired url or content.</para>
		/// </summary>
		/// <param name="url">URL of a script to be added.</param>
		/// <param name="path">
		/// Path to the JavaScript file to be injected into frame. If <c>path</c> is a relative
		/// path, then it is resolved relative to the current working directory.
		/// </param>
		/// <param name="content">Raw JavaScript content to be injected into frame.</param>
		/// <param name="type">
		/// Script type. Use 'module' in order to load a Javascript ES6 module. See <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script">script</a>
		/// for more details.
		/// </param>
		Task<IElementHandle> AddScriptTagAsync(string url = default, string path = default, string content = default, string type = default);

		/// <summary>
		/// <para>
		/// Returns the added tag when the stylesheet's onload fires or when the CSS content
		/// was injected into frame.
		/// </para>
		/// <para>
		/// Adds a <c>&lt;link rel="stylesheet"&gt;</c> tag into the page with the desired url
		/// or a <c>&lt;style type="text/css"&gt;</c> tag with the content.
		/// </para>
		/// </summary>
		/// <param name="url">URL of the <c>&lt;link&gt;</c> tag.</param>
		/// <param name="path">
		/// Path to the CSS file to be injected into frame. If <c>path</c> is a relative path,
		/// then it is resolved relative to the current working directory.
		/// </param>
		/// <param name="content">Raw CSS content to be injected into frame.</param>
		Task<IElementHandle> AddStyleTagAsync(string url = default, string path = default, string content = default);

		/// <summary>
		/// <para>
		/// This method checks an element matching <paramref name="selector"/> by performing
		/// the following steps:
		/// </para>
		/// <list type="ordinal">
		/// <item><description>
		/// Find an element matching <paramref name="selector"/>. If there is none, wait until
		/// a matching element is attached to the DOM.
		/// </description></item>
		/// <item><description>
		/// Ensure that matched element is a checkbox or a radio input. If not, this method
		/// throws. If the element is already checked, this method returns immediately.
		/// </description></item>
		/// <item><description>
		/// Wait for <a href="./actionability.md">actionability</a> checks on the matched element,
		/// unless <paramref name="force"/> option is set. If the element is detached during
		/// the checks, the whole action is retried.
		/// </description></item>
		/// <item><description>Scroll the element into view if needed.</description></item>
		/// <item><description>Use <see cref="IPage.Mouse"/> to click in the center of the element.</description></item>
		/// <item><description>
		/// Wait for initiated navigations to either succeed or fail, unless <paramref name="noWaitAfter"/>
		/// option is set.
		/// </description></item>
		/// <item><description>Ensure that the element is now checked. If not, this method throws.</description></item>
		/// </list>
		/// <para>
		/// When all steps combined have not finished during the specified <paramref name="timeout"/>,
		/// this method throws a <see cref="ITimeoutError"/>. Passing zero timeout disables
		/// this.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="position">
		/// A point to use relative to the top-left corner of element padding box. If not specified,
		/// uses some visible point of the element.
		/// </param>
		/// <param name="force">
		/// Whether to bypass the <a href="./actionability.md">actionability</a> checks. Defaults
		/// to <c>false</c>.
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task CheckAsync(string selector, Position position = default, bool? force = default, bool? noWaitAfter = default, float? timeout = default);

		IReadOnlyCollection<IFrame> ChildFrames { get; }

		/// <summary>
		/// <para>
		/// This method clicks an element matching <paramref name="selector"/> by performing
		/// the following steps:
		/// </para>
		/// <list type="ordinal">
		/// <item><description>
		/// Find an element matching <paramref name="selector"/>. If there is none, wait until
		/// a matching element is attached to the DOM.
		/// </description></item>
		/// <item><description>
		/// Wait for <a href="./actionability.md">actionability</a> checks on the matched element,
		/// unless <paramref name="force"/> option is set. If the element is detached during
		/// the checks, the whole action is retried.
		/// </description></item>
		/// <item><description>Scroll the element into view if needed.</description></item>
		/// <item><description>
		/// Use <see cref="IPage.Mouse"/> to click in the center of the element, or the specified
		/// <paramref name="position"/>.
		/// </description></item>
		/// <item><description>
		/// Wait for initiated navigations to either succeed or fail, unless <paramref name="noWaitAfter"/>
		/// option is set.
		/// </description></item>
		/// </list>
		/// <para>
		/// When all steps combined have not finished during the specified <paramref name="timeout"/>,
		/// this method throws a <see cref="ITimeoutError"/>. Passing zero timeout disables
		/// this.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="button">Defaults to <c>left</c>.</param>
		/// <param name="clickCount">defaults to 1. See <see cref="UIEvent.detail"/>.</param>
		/// <param name="delay">
		/// Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults
		/// to 0.
		/// </param>
		/// <param name="position">
		/// A point to use relative to the top-left corner of element padding box. If not specified,
		/// uses some visible point of the element.
		/// </param>
		/// <param name="modifiers">
		/// Modifier keys to press. Ensures that only these modifiers are pressed during the
		/// operation, and then restores current modifiers back. If not specified, currently
		/// pressed modifiers are used.
		/// </param>
		/// <param name="force">
		/// Whether to bypass the <a href="./actionability.md">actionability</a> checks. Defaults
		/// to <c>false</c>.
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task ClickAsync(string selector, MouseButton button = default, int? clickCount = default, float? delay = default, Position position = default, IEnumerable<KeyboardModifier> modifiers = default, bool? force = default, bool? noWaitAfter = default, float? timeout = default);

		/// <summary><para>Gets the full HTML contents of the frame, including the doctype.</para></summary>
		Task<string> ContentAsync();

		/// <summary>
		/// <para>
		/// This method double clicks an element matching <paramref name="selector"/> by performing
		/// the following steps:
		/// </para>
		/// <list type="ordinal">
		/// <item><description>
		/// Find an element matching <paramref name="selector"/>. If there is none, wait until
		/// a matching element is attached to the DOM.
		/// </description></item>
		/// <item><description>
		/// Wait for <a href="./actionability.md">actionability</a> checks on the matched element,
		/// unless <paramref name="force"/> option is set. If the element is detached during
		/// the checks, the whole action is retried.
		/// </description></item>
		/// <item><description>Scroll the element into view if needed.</description></item>
		/// <item><description>
		/// Use <see cref="IPage.Mouse"/> to double click in the center of the element, or the
		/// specified <paramref name="position"/>.
		/// </description></item>
		/// <item><description>
		/// Wait for initiated navigations to either succeed or fail, unless <paramref name="noWaitAfter"/>
		/// option is set. Note that if the first click of the <c>dblclick()</c> triggers a
		/// navigation event, this method will throw.
		/// </description></item>
		/// </list>
		/// <para>
		/// When all steps combined have not finished during the specified <paramref name="timeout"/>,
		/// this method throws a <see cref="ITimeoutError"/>. Passing zero timeout disables
		/// this.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// <c>frame.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c>
		/// event.
		/// </para>
		/// </remarks>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="button">Defaults to <c>left</c>.</param>
		/// <param name="delay">
		/// Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults
		/// to 0.
		/// </param>
		/// <param name="position">
		/// A point to use relative to the top-left corner of element padding box. If not specified,
		/// uses some visible point of the element.
		/// </param>
		/// <param name="modifiers">
		/// Modifier keys to press. Ensures that only these modifiers are pressed during the
		/// operation, and then restores current modifiers back. If not specified, currently
		/// pressed modifiers are used.
		/// </param>
		/// <param name="force">
		/// Whether to bypass the <a href="./actionability.md">actionability</a> checks. Defaults
		/// to <c>false</c>.
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task DblClickAsync(string selector, MouseButton button = default, float? delay = default, Position position = default, IEnumerable<KeyboardModifier> modifiers = default, bool? force = default, bool? noWaitAfter = default, float? timeout = default);

		/// <summary>
		/// <para>
		/// The snippet below dispatches the <c>click</c> event on the element. Regardless of
		/// the visibility state of the element, <c>click</c> is dispatched. This is equivalent
		/// to calling <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click">element.click()</a>.
		/// </para>
		/// <para>
		/// Under the hood, it creates an instance of an event based on the given <paramref
		/// name="type"/>, initializes it with <paramref name="eventInit"/> properties and dispatches
		/// it on the element. Events are <c>composed</c>, <c>cancelable</c> and bubble by default.
		/// </para>
		/// <para>
		/// Since <paramref name="eventInit"/> is event-specific, please refer to the events
		/// documentation for the lists of initial properties:
		/// </para>
		/// <list type="bullet">
		/// <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent">DragEvent</a></description></item>
		/// <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent">FocusEvent</a></description></item>
		/// <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent">KeyboardEvent</a></description></item>
		/// <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent">MouseEvent</a></description></item>
		/// <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent">PointerEvent</a></description></item>
		/// <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent">TouchEvent</a></description></item>
		/// <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/Event">Event</a></description></item>
		/// </list>
		/// <para>
		/// You can also specify <c>JSHandle</c> as the property value if you want live objects
		/// to be passed into the event:
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="type">DOM event type: <c>"click"</c>, <c>"dragstart"</c>, etc.</param>
		/// <param name="eventInit">Optional event-specific initialization properties.</param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task DispatchEventAsync(string selector, string type, object eventInit = default, float? timeout = default);

		/// <summary>
		/// <para>Returns the return value of <paramref name="expression"/>.</para>
		/// <para>
		/// The method finds an element matching the specified selector within the frame and
		/// passes it as a first argument to <paramref name="expression"/>. See <a href="./selectors.md">Working
		/// with selectors</a> for more details. If no elements match the selector, the method
		/// throws an error.
		/// </para>
		/// <para>
		/// If <paramref name="expression"/> returns a <see cref="Promise"/>, then <see cref="IFrame.EvalOnSelectorAsync"/>
		/// would wait for the promise to resolve and return its value.
		/// </para>
		/// <para>Examples:</para>
		/// </summary>
		/// <param name="selector">
		/// A selector to query for. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="expression">
		/// JavaScript expression to be evaluated in the browser context. If it looks like a
		/// function declaration, it is interpreted as a function. Otherwise, evaluated as an
		/// expression.
		/// </param>
		/// <param name="arg">Optional argument to pass to <paramref name="expression"/>.</param>
		Task<T> EvalOnSelectorAsync<T>(string selector, string expression, object arg = default);

		/// <summary>
		/// <para>Returns the return value of <paramref name="expression"/>.</para>
		/// <para>
		/// The method finds all elements matching the specified selector within the frame and
		/// passes an array of matched elements as a first argument to <paramref name="expression"/>.
		/// See <a href="./selectors.md">Working with selectors</a> for more details.
		/// </para>
		/// <para>
		/// If <paramref name="expression"/> returns a <see cref="Promise"/>, then <see cref="IFrame.EvalOnSelectorAllAsync"/>
		/// would wait for the promise to resolve and return its value.
		/// </para>
		/// <para>Examples:</para>
		/// </summary>
		/// <param name="selector">
		/// A selector to query for. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="expression">
		/// JavaScript expression to be evaluated in the browser context. If it looks like a
		/// function declaration, it is interpreted as a function. Otherwise, evaluated as an
		/// expression.
		/// </param>
		/// <param name="arg">Optional argument to pass to <paramref name="expression"/>.</param>
		Task<T> EvalOnSelectorAllAsync<T>(string selector, string expression, object arg = default);

		/// <summary>
		/// <para>Returns the return value of <paramref name="expression"/>.</para>
		/// <para>
		/// If the function passed to the <see cref="IFrame.EvaluateAsync"/> returns a <see
		/// cref="Promise"/>, then <see cref="IFrame.EvaluateAsync"/> would wait for the promise
		/// to resolve and return its value.
		/// </para>
		/// <para>
		/// If the function passed to the <see cref="IFrame.EvaluateAsync"/> returns a non-<see
		/// cref="Serializable"/> value, then <see cref="IFrame.EvaluateAsync"/> returns <c>undefined</c>.
		/// Playwright also supports transferring some additional values that are not serializable
		/// by <c>JSON</c>: <c>-0</c>, <c>NaN</c>, <c>Infinity</c>, <c>-Infinity</c>.
		/// </para>
		/// <para>A string can also be passed in instead of a function.</para>
		/// <para>
		/// <see cref="IElementHandle"/> instances can be passed as an argument to the <see
		/// cref="IFrame.EvaluateAsync"/>:
		/// </para>
		/// </summary>
		/// <param name="expression">
		/// JavaScript expression to be evaluated in the browser context. If it looks like a
		/// function declaration, it is interpreted as a function. Otherwise, evaluated as an
		/// expression.
		/// </param>
		/// <param name="arg">Optional argument to pass to <paramref name="expression"/>.</param>
		Task<T> EvaluateAsync<T>(string expression, object arg = default);

		/// <summary>
		/// <para>Returns the return value of <paramref name="expression"/> as a <see cref="IJSHandle"/>.</para>
		/// <para>
		/// The only difference between <see cref="IFrame.EvaluateAsync"/> and <see cref="IFrame.EvaluateHandleAsync"/>
		/// is that <see cref="IFrame.EvaluateHandleAsync"/> returns <see cref="IJSHandle"/>.
		/// </para>
		/// <para>
		/// If the function, passed to the <see cref="IFrame.EvaluateHandleAsync"/>, returns
		/// a <see cref="Promise"/>, then <see cref="IFrame.EvaluateHandleAsync"/> would wait
		/// for the promise to resolve and return its value.
		/// </para>
		/// <para>A string can also be passed in instead of a function.</para>
		/// <para><see cref="IJSHandle"/> instances can be passed as an argument to the <see cref="IFrame.EvaluateHandleAsync"/>:</para>
		/// </summary>
		/// <param name="expression">
		/// JavaScript expression to be evaluated in the browser context. If it looks like a
		/// function declaration, it is interpreted as a function. Otherwise, evaluated as an
		/// expression.
		/// </param>
		/// <param name="arg">Optional argument to pass to <paramref name="expression"/>.</param>
		Task<IJSHandle> EvaluateHandleAsync(string expression, object arg = default);

		/// <summary>
		/// <para>
		/// This method waits for an element matching <paramref name="selector"/>, waits for
		/// <a href="./actionability.md">actionability</a> checks, focuses the element, fills
		/// it and triggers an <c>input</c> event after filling. If the element is inside the
		/// <c>&lt;label&gt;</c> element that has associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>,
		/// that control will be filled instead. If the element to be filled is not an <c>&lt;input&gt;</c>,
		/// <c>&lt;textarea&gt;</c> or <c>[contenteditable]</c> element, this method throws
		/// an error. Note that you can pass an empty string to clear the input field.
		/// </para>
		/// <para>To send fine-grained keyboard events, use <see cref="IFrame.TypeAsync"/>.</para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="value">
		/// Value to fill for the <c>&lt;input&gt;</c>, <c>&lt;textarea&gt;</c> or <c>[contenteditable]</c>
		/// element.
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task FillAsync(string selector, string value, bool? noWaitAfter = default, float? timeout = default);

		/// <summary>
		/// <para>
		/// This method fetches an element with <paramref name="selector"/> and focuses it.
		/// If there's no element matching <paramref name="selector"/>, the method waits until
		/// a matching element appears in the DOM.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task FocusAsync(string selector, float? timeout = default);

		/// <summary>
		/// <para>
		/// Returns the <c>frame</c> or <c>iframe</c> element handle which corresponds to this
		/// frame.
		/// </para>
		/// <para>
		/// This is an inverse of <see cref="IElementHandle.ContentFrameAsync"/>. Note that
		/// returned handle actually belongs to the parent frame.
		/// </para>
		/// <para>
		/// This method throws an error if the frame has been detached before <c>frameElement()</c>
		/// returns.
		/// </para>
		/// </summary>
		Task<IElementHandle> FrameElementAsync();

		/// <summary><para>Returns element attribute value.</para></summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="name">Attribute name to get the value for.</param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<string> GetAttributeAsync(string selector, string name, float? timeout = default);

		/// <summary>
		/// <para>
		/// Returns the main resource response. In case of multiple redirects, the navigation
		/// will resolve with the response of the last redirect.
		/// </para>
		/// <para><c>frame.goto</c> will throw an error if:</para>
		/// <list type="bullet">
		/// <item><description>there's an SSL error (e.g. in case of self-signed certificates).</description></item>
		/// <item><description>target URL is invalid.</description></item>
		/// <item><description>the <paramref name="timeout"/> is exceeded during navigation.</description></item>
		/// <item><description>the remote server does not respond or is unreachable.</description></item>
		/// <item><description>the main resource failed to load.</description></item>
		/// </list>
		/// <para>
		/// <c>frame.goto</c> will not throw an error when any valid HTTP status code is returned
		/// by the remote server, including 404 "Not Found" and 500 "Internal Server Error".
		/// The status code for such responses can be retrieved by calling <see cref="IResponse.Status"/>.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// <c>frame.goto</c> either throws an error or returns a main resource response. The
		/// only exceptions are navigation to <c>about:blank</c> or navigation to the same URL
		/// with a different hash, which would succeed and return <c>null</c>.
		/// </para>
		/// <para>
		/// Headless mode doesn't support navigation to a PDF document. See the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=761295">upstream
		/// issue</a>.
		/// </para>
		/// </remarks>
		/// <param name="url">URL to navigate frame to. The url should include scheme, e.g. <c>https://</c>.</param>
		/// <param name="waitUntil">
		/// When to consider operation succeeded, defaults to <c>load</c>. Events can be either:
		/// <list type="bullet">
		/// <item><description>
		/// <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c>
		/// event is fired.
		/// </description></item>
		/// <item><description>
		/// <c>'load'</c> - consider operation to be finished when the <c>load</c> event is
		/// fired.
		/// </description></item>
		/// <item><description>
		/// <c>'networkidle'</c> - consider operation to be finished when there are no network
		/// connections for at least <c>500</c> ms.
		/// </description></item>
		/// </list>
		/// </param>
		/// <param name="timeout">
		/// Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to
		/// disable timeout. The default value can be changed by using the <see cref="IBrowserContext.SetDefaultNavigationTimeout"/>,
		/// <see cref="IBrowserContext.SetDefaultTimeout"/>, <see cref="IPage.SetDefaultNavigationTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		/// <param name="referer">
		/// Referer header value. If provided it will take preference over the referer header
		/// value set by <see cref="IPage.SetExtraHttpHeadersAsync"/>.
		/// </param>
		Task<IResponse> GoToAsync(string url, WaitUntilState waitUntil = default, float? timeout = default, string referer = default);

		/// <summary>
		/// <para>
		/// This method hovers over an element matching <paramref name="selector"/> by performing
		/// the following steps:
		/// </para>
		/// <list type="ordinal">
		/// <item><description>
		/// Find an element matching <paramref name="selector"/>. If there is none, wait until
		/// a matching element is attached to the DOM.
		/// </description></item>
		/// <item><description>
		/// Wait for <a href="./actionability.md">actionability</a> checks on the matched element,
		/// unless <paramref name="force"/> option is set. If the element is detached during
		/// the checks, the whole action is retried.
		/// </description></item>
		/// <item><description>Scroll the element into view if needed.</description></item>
		/// <item><description>
		/// Use <see cref="IPage.Mouse"/> to hover over the center of the element, or the specified
		/// <paramref name="position"/>.
		/// </description></item>
		/// <item><description>
		/// Wait for initiated navigations to either succeed or fail, unless <c>noWaitAfter</c>
		/// option is set.
		/// </description></item>
		/// </list>
		/// <para>
		/// When all steps combined have not finished during the specified <paramref name="timeout"/>,
		/// this method throws a <see cref="ITimeoutError"/>. Passing zero timeout disables
		/// this.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="position">
		/// A point to use relative to the top-left corner of element padding box. If not specified,
		/// uses some visible point of the element.
		/// </param>
		/// <param name="modifiers">
		/// Modifier keys to press. Ensures that only these modifiers are pressed during the
		/// operation, and then restores current modifiers back. If not specified, currently
		/// pressed modifiers are used.
		/// </param>
		/// <param name="force">
		/// Whether to bypass the <a href="./actionability.md">actionability</a> checks. Defaults
		/// to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task HoverAsync(string selector, Position position = default, IEnumerable<KeyboardModifier> modifiers = default, bool? force = default, float? timeout = default);

		/// <summary><para>Returns <c>element.innerHTML</c>.</para></summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<string> InnerHTMLAsync(string selector, float? timeout = default);

		/// <summary><para>Returns <c>element.innerText</c>.</para></summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<string> InnerTextAsync(string selector, float? timeout = default);

		/// <summary>
		/// <para>
		/// Returns whether the element is checked. Throws if the element is not a checkbox
		/// or radio input.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<bool> IsCheckedAsync(string selector, float? timeout = default);

		/// <summary><para>Returns <c>true</c> if the frame has been detached, or <c>false</c> otherwise.</para></summary>
		bool IsDetached { get; }

		/// <summary><para>Returns whether the element is disabled, the opposite of <a href="./actionability.md#enabled">enabled</a>.</para></summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<bool> IsDisabledAsync(string selector, float? timeout = default);

		/// <summary><para>Returns whether the element is <a href="./actionability.md#editable">editable</a>.</para></summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<bool> IsEditableAsync(string selector, float? timeout = default);

		/// <summary><para>Returns whether the element is <a href="./actionability.md#enabled">enabled</a>.</para></summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<bool> IsEnabledAsync(string selector, float? timeout = default);

		/// <summary>
		/// <para>
		/// Returns whether the element is hidden, the opposite of <a href="./actionability.md#visible">visible</a>.
		/// <paramref name="selector"/> that does not match any elements is considered hidden.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<bool> IsHiddenAsync(string selector, float? timeout = default);

		/// <summary>
		/// <para>
		/// Returns whether the element is <a href="./actionability.md#visible">visible</a>.
		/// <paramref name="selector"/> that does not match any elements is considered not visible.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<bool> IsVisibleAsync(string selector, float? timeout = default);

		/// <summary>
		/// <para>Returns frame's name attribute as specified in the tag.</para>
		/// <para>If the name is empty, returns the id attribute instead.</para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// This value is calculated once when the frame is created, and will not update if
		/// the attribute is changed later.
		/// </para>
		/// </remarks>
		string Name { get; }

		/// <summary><para>Returns the page containing this frame.</para></summary>
		IPage Page { get; }

		/// <summary><para>Parent frame, if any. Detached frames and main frames return <c>null</c>.</para></summary>
		IFrame ParentFrame { get; }

		/// <summary>
		/// <para>
		/// <paramref name="key"/> can specify the intended <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key">keyboardEvent.key</a>
		/// value or a single character to generate the text for. A superset of the <paramref
		/// name="key"/> values can be found <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values">here</a>.
		/// Examples of the keys are:
		/// </para>
		/// <para>
		/// <c>F1</c> - <c>F12</c>, <c>Digit0</c>- <c>Digit9</c>, <c>KeyA</c>- <c>KeyZ</c>,
		/// <c>Backquote</c>, <c>Minus</c>, <c>Equal</c>, <c>Backslash</c>, <c>Backspace</c>,
		/// <c>Tab</c>, <c>Delete</c>, <c>Escape</c>, <c>ArrowDown</c>, <c>End</c>, <c>Enter</c>,
		/// <c>Home</c>, <c>Insert</c>, <c>PageDown</c>, <c>PageUp</c>, <c>ArrowRight</c>, <c>ArrowUp</c>,
		/// etc.
		/// </para>
		/// <para>
		/// Following modification shortcuts are also supported: <c>Shift</c>, <c>Control</c>,
		/// <c>Alt</c>, <c>Meta</c>, <c>ShiftLeft</c>.
		/// </para>
		/// <para>
		/// Holding down <c>Shift</c> will type the text that corresponds to the <paramref name="key"/>
		/// in the upper case.
		/// </para>
		/// <para>
		/// If <paramref name="key"/> is a single character, it is case-sensitive, so the values
		/// <c>a</c> and <c>A</c> will generate different respective texts.
		/// </para>
		/// <para>
		/// Shortcuts such as <c>key: "Control+o"</c> or <c>key: "Control+Shift+T"</c> are supported
		/// as well. When specified with the modifier, modifier is pressed and being held while
		/// the subsequent key is being pressed.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="key">
		/// Name of the key to press or a character to generate, such as <c>ArrowLeft</c> or
		/// <c>a</c>.
		/// </param>
		/// <param name="delay">
		/// Time to wait between <c>keydown</c> and <c>keyup</c> in milliseconds. Defaults to
		/// 0.
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task PressAsync(string selector, string key, float? delay = default, bool? noWaitAfter = default, float? timeout = default);

		/// <summary>
		/// <para>Returns the ElementHandle pointing to the frame element.</para>
		/// <para>
		/// The method finds an element matching the specified selector within the frame. See
		/// <a href="./selectors.md">Working with selectors</a> for more details. If no elements
		/// match the selector, returns <c>null</c>.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to query for. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		Task<IElementHandle> QuerySelectorAsync(string selector);

		/// <summary>
		/// <para>Returns the ElementHandles pointing to the frame elements.</para>
		/// <para>
		/// The method finds all elements matching the specified selector within the frame.
		/// See <a href="./selectors.md">Working with selectors</a> for more details. If no
		/// elements match the selector, returns empty array.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to query for. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		Task<IReadOnlyCollection<IElementHandle>> QuerySelectorAllAsync(string selector);

		/// <summary>
		/// <para>Returns the array of option values that have been successfully selected.</para>
		/// <para>
		/// Triggers a <c>change</c> and <c>input</c> event once all the provided options have
		/// been selected. If there's no <c>&lt;select&gt;</c> element matching <paramref name="selector"/>,
		/// the method throws an error.
		/// </para>
		/// <para>Will wait until all specified options are present in the <c>&lt;select&gt;</c> element.</para>
		/// </summary>
		/// <param name="selector">
		/// A selector to query for. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="values">
		/// Options to select. If the <c>&lt;select&gt;</c> has the <c>multiple</c> attribute,
		/// all matching options are selected, otherwise only the first option matching one
		/// of the passed options is selected. String values are equivalent to <c>{value:'string'}</c>.
		/// Option is considered matching if all specified properties match.
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<IReadOnlyCollection<string>> SelectOptionAsync(string selector, IEnumerable<SelectOptionValue> values, bool? noWaitAfter = default, float? timeout = default);

		/// <param name="html">HTML markup to assign to the page.</param>
		/// <param name="timeout">
		/// Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to
		/// disable timeout. The default value can be changed by using the <see cref="IBrowserContext.SetDefaultNavigationTimeout"/>,
		/// <see cref="IBrowserContext.SetDefaultTimeout"/>, <see cref="IPage.SetDefaultNavigationTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		/// <param name="waitUntil">
		/// When to consider operation succeeded, defaults to <c>load</c>. Events can be either:
		/// <list type="bullet">
		/// <item><description>
		/// <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c>
		/// event is fired.
		/// </description></item>
		/// <item><description>
		/// <c>'load'</c> - consider operation to be finished when the <c>load</c> event is
		/// fired.
		/// </description></item>
		/// <item><description>
		/// <c>'networkidle'</c> - consider operation to be finished when there are no network
		/// connections for at least <c>500</c> ms.
		/// </description></item>
		/// </list>
		/// </param>
		Task SetContentAsync(string html, float? timeout = default, WaitUntilState waitUntil = default);

		/// <summary>
		/// <para>
		/// This method expects <paramref name="selector"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input
		/// element</a>.
		/// </para>
		/// <para>
		/// Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c>
		/// are relative paths, then they are resolved relative to the the current working directory.
		/// For empty array, clears the selected files.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="files">
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task SetInputFilesAsync(string selector, IEnumerable<FilePayload> files, bool? noWaitAfter = default, float? timeout = default);

		/// <summary>
		/// <para>
		/// This method taps an element matching <paramref name="selector"/> by performing the
		/// following steps:
		/// </para>
		/// <list type="ordinal">
		/// <item><description>
		/// Find an element matching <paramref name="selector"/>. If there is none, wait until
		/// a matching element is attached to the DOM.
		/// </description></item>
		/// <item><description>
		/// Wait for <a href="./actionability.md">actionability</a> checks on the matched element,
		/// unless <paramref name="force"/> option is set. If the element is detached during
		/// the checks, the whole action is retried.
		/// </description></item>
		/// <item><description>Scroll the element into view if needed.</description></item>
		/// <item><description>
		/// Use <see cref="IPage.Touchscreen"/> to tap the center of the element, or the specified
		/// <paramref name="position"/>.
		/// </description></item>
		/// <item><description>
		/// Wait for initiated navigations to either succeed or fail, unless <paramref name="noWaitAfter"/>
		/// option is set.
		/// </description></item>
		/// </list>
		/// <para>
		/// When all steps combined have not finished during the specified <paramref name="timeout"/>,
		/// this method throws a <see cref="ITimeoutError"/>. Passing zero timeout disables
		/// this.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// <c>frame.tap()</c> requires that the <c>hasTouch</c> option of the browser context
		/// be set to true.
		/// </para>
		/// </remarks>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="position">
		/// A point to use relative to the top-left corner of element padding box. If not specified,
		/// uses some visible point of the element.
		/// </param>
		/// <param name="modifiers">
		/// Modifier keys to press. Ensures that only these modifiers are pressed during the
		/// operation, and then restores current modifiers back. If not specified, currently
		/// pressed modifiers are used.
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="force">
		/// Whether to bypass the <a href="./actionability.md">actionability</a> checks. Defaults
		/// to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task TapAsync(string selector, Position position = default, IEnumerable<KeyboardModifier> modifiers = default, bool? noWaitAfter = default, bool? force = default, float? timeout = default);

		/// <summary><para>Returns <c>element.textContent</c>.</para></summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<string> TextContentAsync(string selector, float? timeout = default);

		/// <summary><para>Returns the page title.</para></summary>
		Task<string> TitleAsync();

		/// <summary>
		/// <para>
		/// Sends a <c>keydown</c>, <c>keypress</c>/<c>input</c>, and <c>keyup</c> event for
		/// each character in the text. <c>frame.type</c> can be used to send fine-grained keyboard
		/// events. To fill values in form fields, use <see cref="IFrame.FillAsync"/>.
		/// </para>
		/// <para>To press a special key, like <c>Control</c> or <c>ArrowDown</c>, use <see cref="IKeyboard.PressAsync"/>.</para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="text">A text to type into a focused element.</param>
		/// <param name="delay">Time to wait between key presses in milliseconds. Defaults to 0.</param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task TypeAsync(string selector, string text, float? delay = default, bool? noWaitAfter = default, float? timeout = default);

		/// <summary>
		/// <para>
		/// This method checks an element matching <paramref name="selector"/> by performing
		/// the following steps:
		/// </para>
		/// <list type="ordinal">
		/// <item><description>
		/// Find an element matching <paramref name="selector"/>. If there is none, wait until
		/// a matching element is attached to the DOM.
		/// </description></item>
		/// <item><description>
		/// Ensure that matched element is a checkbox or a radio input. If not, this method
		/// throws. If the element is already unchecked, this method returns immediately.
		/// </description></item>
		/// <item><description>
		/// Wait for <a href="./actionability.md">actionability</a> checks on the matched element,
		/// unless <paramref name="force"/> option is set. If the element is detached during
		/// the checks, the whole action is retried.
		/// </description></item>
		/// <item><description>Scroll the element into view if needed.</description></item>
		/// <item><description>Use <see cref="IPage.Mouse"/> to click in the center of the element.</description></item>
		/// <item><description>
		/// Wait for initiated navigations to either succeed or fail, unless <paramref name="noWaitAfter"/>
		/// option is set.
		/// </description></item>
		/// <item><description>Ensure that the element is now unchecked. If not, this method throws.</description></item>
		/// </list>
		/// <para>
		/// When all steps combined have not finished during the specified <paramref name="timeout"/>,
		/// this method throws a <see cref="ITimeoutError"/>. Passing zero timeout disables
		/// this.
		/// </para>
		/// </summary>
		/// <param name="selector">
		/// A selector to search for element. If there are multiple elements satisfying the
		/// selector, the first will be used. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="position">
		/// A point to use relative to the top-left corner of element padding box. If not specified,
		/// uses some visible point of the element.
		/// </param>
		/// <param name="force">
		/// Whether to bypass the <a href="./actionability.md">actionability</a> checks. Defaults
		/// to <c>false</c>.
		/// </param>
		/// <param name="noWaitAfter">
		/// Actions that initiate navigations are waiting for these navigations to happen and
		/// for pages to start loading. You can opt out of waiting via setting this flag. You
		/// would only need this option in the exceptional cases such as navigating to inaccessible
		/// pages. Defaults to <c>false</c>.
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task UncheckAsync(string selector, Position position = default, bool? force = default, bool? noWaitAfter = default, float? timeout = default);

		/// <summary><para>Returns frame's url.</para></summary>
		string Url { get; }

		/// <summary>
		/// <para>
		/// Returns when the <paramref name="expression"/> returns a truthy value, returns that
		/// value.
		/// </para>
		/// <para>
		/// The <see cref="IFrame.WaitForFunctionAsync"/> can be used to observe viewport size
		/// change:
		/// </para>
		/// <para>To pass an argument to the predicate of <c>frame.waitForFunction</c> function:</para>
		/// </summary>
		/// <param name="expression">
		/// JavaScript expression to be evaluated in the browser context. If it looks like a
		/// function declaration, it is interpreted as a function. Otherwise, evaluated as an
		/// expression.
		/// </param>
		/// <param name="arg">Optional argument to pass to <paramref name="expression"/>.</param>
		/// <param name="pollingInterval">
		/// If specified, then it is treated as an interval in milliseconds at which the function
		/// would be executed. By default if the option is not specified <paramref name="expression"/>
		/// is executed in <c>requestAnimationFrame</c> callback.
		/// </param>
		/// <param name="timeout">
		/// maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds).
		/// Pass <c>0</c> to disable timeout. The default value can be changed by using the
		/// <see cref="IBrowserContext.SetDefaultTimeout"/>.
		/// </param>
		Task<IJSHandle> WaitForFunctionAsync(string expression, object arg = default, float? pollingInterval = default, float? timeout = default);

		/// <summary>
		/// <para>Waits for the required load state to be reached.</para>
		/// <para>
		/// This returns when the frame reaches a required load state, <c>load</c> by default.
		/// The navigation must have been committed when this method is called. If current document
		/// has already reached the required state, resolves immediately.
		/// </para>
		/// </summary>
		/// <param name="state">
		/// Optional load state to wait for, defaults to <c>load</c>. If the state has been
		/// already reached while loading current document, the method resolves immediately.
		/// Can be one of:
		/// <list type="bullet">
		/// <item><description><c>'load'</c> - wait for the <c>load</c> event to be fired.</description></item>
		/// <item><description><c>'domcontentloaded'</c> - wait for the <c>DOMContentLoaded</c> event to be fired.</description></item>
		/// <item><description>
		/// <c>'networkidle'</c> - wait until there are no network connections for at least
		/// <c>500</c> ms.
		/// </description></item>
		/// </list>
		/// </param>
		/// <param name="timeout">
		/// Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to
		/// disable timeout. The default value can be changed by using the <see cref="IBrowserContext.SetDefaultNavigationTimeout"/>,
		/// <see cref="IBrowserContext.SetDefaultTimeout"/>, <see cref="IPage.SetDefaultNavigationTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task WaitForLoadStateAsync(LoadState state = default, float? timeout = default);

		/// <summary>
		/// <para>
		/// Waits for the frame navigation and returns the main resource response. In case of
		/// multiple redirects, the navigation will resolve with the response of the last redirect.
		/// In case of navigation to a different anchor or navigation due to History API usage,
		/// the navigation will resolve with <c>null</c>.
		/// </para>
		/// <para>
		/// This method waits for the frame to navigate to a new URL. It is useful for when
		/// you run code which will indirectly cause the frame to navigate. Consider this example:
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History
		/// API</a> to change the URL is considered a navigation.
		/// </para>
		/// </remarks>
		/// <param name="urlString">
		/// A glob pattern, regex pattern or predicate receiving <see cref="URL"/> to match
		/// while waiting for the navigation.
		/// </param>
		/// <param name="urlRegex">
		/// A glob pattern, regex pattern or predicate receiving <see cref="URL"/> to match
		/// while waiting for the navigation.
		/// </param>
		/// <param name="urlFunc">
		/// A glob pattern, regex pattern or predicate receiving <see cref="URL"/> to match
		/// while waiting for the navigation.
		/// </param>
		/// <param name="waitUntil">
		/// When to consider operation succeeded, defaults to <c>load</c>. Events can be either:
		/// <list type="bullet">
		/// <item><description>
		/// <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c>
		/// event is fired.
		/// </description></item>
		/// <item><description>
		/// <c>'load'</c> - consider operation to be finished when the <c>load</c> event is
		/// fired.
		/// </description></item>
		/// <item><description>
		/// <c>'networkidle'</c> - consider operation to be finished when there are no network
		/// connections for at least <c>500</c> ms.
		/// </description></item>
		/// </list>
		/// </param>
		/// <param name="timeout">
		/// Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to
		/// disable timeout. The default value can be changed by using the <see cref="IBrowserContext.SetDefaultNavigationTimeout"/>,
		/// <see cref="IBrowserContext.SetDefaultTimeout"/>, <see cref="IPage.SetDefaultNavigationTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<IResponse> WaitForNavigationAsync(string urlString = default, Regex urlRegex = default, Func<string, bool> urlFunc = default, WaitUntilState waitUntil = default, float? timeout = default);

		/// <summary>
		/// <para>
		/// Returns when element specified by selector satisfies <paramref name="state"/> option.
		/// Returns <c>null</c> if waiting for <c>hidden</c> or <c>detached</c>.
		/// </para>
		/// <para>
		/// Wait for the <paramref name="selector"/> to satisfy <paramref name="state"/> option
		/// (either appear/disappear from dom, or become visible/hidden). If at the moment of
		/// calling the method <paramref name="selector"/> already satisfies the condition,
		/// the method will return immediately. If the selector doesn't satisfy the condition
		/// for the <paramref name="timeout"/> milliseconds, the function will throw.
		/// </para>
		/// <para>This method works across navigations:</para>
		/// </summary>
		/// <param name="selector">
		/// A selector to query for. See <a href="./selectors.md">working with selectors</a>
		/// for more details.
		/// </param>
		/// <param name="state">
		/// Defaults to <c>'visible'</c>. Can be either:
		/// <list type="bullet">
		/// <item><description><c>'attached'</c> - wait for element to be present in DOM.</description></item>
		/// <item><description><c>'detached'</c> - wait for element to not be present in DOM.</description></item>
		/// <item><description>
		/// <c>'visible'</c> - wait for element to have non-empty bounding box and no <c>visibility:hidden</c>.
		/// Note that element without any content or with <c>display:none</c> has an empty bounding
		/// box and is not considered visible.
		/// </description></item>
		/// <item><description>
		/// <c>'hidden'</c> - wait for element to be either detached from DOM, or have an empty
		/// bounding box or <c>visibility:hidden</c>. This is opposite to the <c>'visible'</c>
		/// option.
		/// </description></item>
		/// </list>
		/// </param>
		/// <param name="timeout">
		/// Maximum time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout.
		/// The default value can be changed by using the <see cref="IBrowserContext.SetDefaultTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		Task<IElementHandle> WaitForSelectorAsync(string selector, WaitForSelectorState state = default, float? timeout = default);

		/// <summary>
		/// <para>Waits for the given <paramref name="timeout"/> in milliseconds.</para>
		/// <para>
		/// Note that <c>frame.waitForTimeout()</c> should only be used for debugging. Tests
		/// using the timer in production are going to be flaky. Use signals such as network
		/// events, selectors becoming visible and others instead.
		/// </para>
		/// </summary>
		/// <param name="timeout">A timeout to wait for</param>
		Task WaitForTimeoutAsync(float timeout);

		/// <summary><para>Waits for the frame to navigate to the given URL.</para></summary>
		/// <param name="urlString">
		/// A glob pattern, regex pattern or predicate receiving <see cref="URL"/> to match
		/// while waiting for the navigation.
		/// </param>
		/// <param name="urlRegex">
		/// A glob pattern, regex pattern or predicate receiving <see cref="URL"/> to match
		/// while waiting for the navigation.
		/// </param>
		/// <param name="urlFunc">
		/// A glob pattern, regex pattern or predicate receiving <see cref="URL"/> to match
		/// while waiting for the navigation.
		/// </param>
		/// <param name="timeout">
		/// Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to
		/// disable timeout. The default value can be changed by using the <see cref="IBrowserContext.SetDefaultNavigationTimeout"/>,
		/// <see cref="IBrowserContext.SetDefaultTimeout"/>, <see cref="IPage.SetDefaultNavigationTimeout"/>
		/// or <see cref="IPage.SetDefaultTimeout"/> methods.
		/// </param>
		/// <param name="waitUntil">
		/// When to consider operation succeeded, defaults to <c>load</c>. Events can be either:
		/// <list type="bullet">
		/// <item><description>
		/// <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c>
		/// event is fired.
		/// </description></item>
		/// <item><description>
		/// <c>'load'</c> - consider operation to be finished when the <c>load</c> event is
		/// fired.
		/// </description></item>
		/// <item><description>
		/// <c>'networkidle'</c> - consider operation to be finished when there are no network
		/// connections for at least <c>500</c> ms.
		/// </description></item>
		/// </list>
		/// </param>
		Task WaitForURLAsync(string urlString, Regex urlRegex, Func<string, bool> urlFunc, float? timeout = default, WaitUntilState waitUntil = default);
	}
}
